import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView,
    redirect:'/basicInformation',
    children:[
      {path: '/basicInformation', component: () => import('../views/basic_data/BasicInformation.vue')},
      {path: '/approvalProcess', component: () => import('../views/basic_data/ApprovalProcess.vue')},
      {path: '/reimbursementType', component: () => import('../views/basic_data/ReimbursementType.vue')},
      {path: '/expenseType', component: () => import('../views/basic_data/ExpenseType.vue')},
      {path: '/homeDisplay', component: () => import('../views/workbench/HomeDisplay.vue')},
      {path: '/departmentStructure', component: () => import('../views/human_resources/DepartmentStructure.vue')},
      {path: '/employees', component: () => import('../views/human_resources/Employees.vue')},
      {path: '/exitFile', component: () => import('../views/human_resources/ExitFile.vue')},
      {path: '/personTransfers', component: () => import('../views/human_resources/PersonTransfers.vue')},
      {path: '/sealManagement', component: () => import('../views/administration/SealManagement.vue')},
      {path: '/vehicleManagement', component: () => import('../views/administration/VehicleManagement.vue')},
      {path: '/roomManagement', component: () => import('../views/administration/RoomManagement.vue')},
      {path: '/reimbursementManagement', component: () => import('../views/financial_management/ReimbursementManagement.vue')},
      {path: '/reimbursementPayments', component: () => import('../views/financial_management/ReimbursementPayments.vue')},
      {path: '/invoiceManagement', component: () => import('../views/financial_management/InvoiceManagement.vue')},
      {path: '/invoicing', component: () => import('../views/financial_management/Invoicing.vue')},
      {path: '/invoicesArrived', component: () => import('../views/financial_management/InvoicesArrived.vue')},
      {path: '/announcementsList', component: () => import('../views/corporate_announcements/AnnouncementsList.vue')},
      {path: '/initiated', component: () => import('../views/office_approvals/Initiated.vue')},
      {path: '/dealtWith', component: () => import('../views/office_approvals/DealtWith.vue')},
      {path: '/ccedToMe', component: () => import('../views/office_approvals/CcedToMe.vue')},
      {path: '/schedule', component: () => import('../views/daily_office/Schedule.vue')},
      {path: '/calendarEvents', component: () => import('../views/daily_office/CalendarEvents.vue')},
      {path: '/workRecords', component: () => import('../views/daily_office/WorkRecords.vue')},
      {path: '/workCalendar', component: () => import('../views/daily_office/WorkCalendar.vue')},
      {path: '/debriefing', component: () => import('../views/daily_office/Debriefing.vue')},
      {path: '/customerLists', component: () => import('../views/customer_management/CustomerLists.vue')},
      {path: '/customerContacts', component: () => import('../views/customer_management/CustomerContacts.vue')},
      {path: '/salesOpportunities', component: () => import('../views/customer_management/SalesOpportunities.vue')},
      {path: '/followUpRecords', component: () => import('../views/customer_management/FollowUpRecords.vue')},
      {path: '/contractCategory', component: () => import('../views/contractual_agreements/ContractCategory.vue')},
      {path: '/contractsList', component: () => import('../views/contractual_agreements/ContractsList.vue')},
      {path: '/itemsList', component: () => import('../views/project_management/ItemsList.vue')},
      {path: '/taskList', component: () => import('../views/project_management/TaskList.vue')},
      {path: '/functionalNodes', component: () => import('../views/system_administration/FunctionalNodes.vue')},
      {path: '/rolePermissions', component: () => import('../views/system_administration/RolePermissions.vue')},
      {path: '/dataPermissions', component: () => import('../views/system_administration/DataPermissions.vue')},
      {path: '/operationLogs', component: () => import('../views/system_administration/OperationLogs.vue')},
      {path: '/dict', component: () => import('../views/dictionary/DictView.vue')},
      {path: '/dictOption', component: () => import('../views/dictionary/DictOptionView.vue')}
    ]
  },
  {path: '/login', component: () => import('../views/LoginView')}
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router